﻿using MainApplication.BaseLerning;

namespace MainApplication.CommonMiddleWare
{
    public class ShowInfoInPageMid : IMiddleware
    {
        public ShowInfoInPageMid() { }

        public async Task InvokeAsync(HttpContext context, RequestDelegate next)
        {
            context.Response.ContentType = "text/plain; charset=utf-8";  //防止出现中文乱码
            String info=QueryByLINQ.getData();
            Console.WriteLine(info);//输出到控制台
           await context.Response.WriteAsync(info);//输出到页面
            return;
        }
    }
}
